﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 考生基础输入参数
    /// </summary>
    public class KaoshengBaseInput
    {
        /// <summary>
        /// 考试
        /// </summary>
        public virtual long KaoshiId { get; set; }
        
        /// <summary>
        /// 班级
        /// </summary>
        public virtual long BanjiId { get; set; }

        /// <summary>
        /// 教学班
        /// </summary>
        public virtual long JiaoxueBanId { get; set; }

        /// <summary>
        /// 学生
        /// </summary>
        public virtual long StudentId { get; set; }
        
        /// <summary>
        /// 考号
        /// </summary>
        public virtual int? KaoHao { get; set; }
        
        /// <summary>
        /// 试场号
        /// </summary>
        public virtual string? ShiChangNum { get; set; }
        
        /// <summary>
        /// 座位号
        /// </summary>
        public virtual string? ZuoweiHao { get; set; }
        
        /// <summary>
        /// 准考证号
        /// </summary>
        public virtual string? ZhunkaoZhenghao { get; set; }
        
        /// <summary>
        /// 参与统计
        /// </summary>
        public virtual bool? Active { get; set; }
        
        /// <summary>
        /// 总分
        /// </summary>
        public virtual double? ZongFen { get; set; }
        
        /// <summary>
        /// 班级名次
        /// </summary>
        public virtual int? BanjiMC { get; set; }
        
        /// <summary>
        /// 年级名次
        /// </summary>
        public virtual int? JiMC { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 考生分页查询输入参数
    /// </summary>
    public class KaoshengInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 考试
        /// </summary>
        public long? KaoshiId { get; set; }
        
        /// <summary>
        /// 班级
        /// </summary>
        public long? BanjiId { get; set; }
        
        /// <summary>
        /// 学生
        /// </summary>
        public long? StudentId { get; set; }
        
        /// <summary>
        /// 考号
        /// </summary>
        public int? KaoHao { get; set; }
        
        /// <summary>
        /// 试场号
        /// </summary>
        public string? ShiChangNum { get; set; }
        
        /// <summary>
        /// 座位号
        /// </summary>
        public string? ZuoweiHao { get; set; }
        
        /// <summary>
        /// 准考证号
        /// </summary>
        public string? ZhunkaoZhenghao { get; set; }
        
        /// <summary>
        /// 参与统计
        /// </summary>
        public bool? Active { get; set; }
        
        /// <summary>
        /// 总分
        /// </summary>
        public double? ZongFen { get; set; }
        
        /// <summary>
        /// 班级名次
        /// </summary>
        public int? BanjiMC { get; set; }
        
        /// <summary>
        /// 年级名次
        /// </summary>
        public int? JiMC { get; set; }
        
    }

    /// <summary>
    /// 考生增加输入参数
    /// </summary>
    public class AddKaoshengInput : KaoshengBaseInput
    {
        /// <summary>
        /// 考试
        /// </summary>
        [Required(ErrorMessage = "考试不能为空")]
        public override long KaoshiId { get; set; }
        
        /// <summary>
        /// 班级
        /// </summary>
        [Required(ErrorMessage = "班级不能为空")]
        public override long BanjiId { get; set; }
        
        /// <summary>
        /// 学生
        /// </summary>
        [Required(ErrorMessage = "学生不能为空")]
        public override long StudentId { get; set; }
        
    }

    /// <summary>
    /// 考生删除输入参数
    /// </summary>
    public class DeleteKaoshengInput : BaseIdInput
    {
    }

    /// <summary>
    /// 考生更新输入参数
    /// </summary>
    public class UpdateKaoshengInput : KaoshengBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 考生主键查询输入参数
    /// </summary>
    public class QueryByIdKaoshengInput : DeleteKaoshengInput
    {

    }

public class ImportFromStudentInput
{
    public long KaoshiId { get; set; }

    public List<long> StudentIds { get; set; } 
}

public class KaoshengKaoshiIdInput
{
    public long KaoshiId { get; set; }
}

public class ImportKaoshengInput
{
    public long KaoshiId { get; set; }

    public long fileId { get; set; }
}
